package model;


public class User implements java.io.Serializable {

	private Integer uid;
	private String uname;
	private String upassword;
	private boolean isAdm;

	public User() {
	}

	public User(String uname, String upassword, boolean isAdm) {
		this.uname = uname;
		this.upassword = upassword;
		this.isAdm = isAdm;
	}


	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	public String getUname() {
		return this.uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getUpassword() {
		return this.upassword;
	}

	public void setUpassword(String upassword) {
		this.upassword = upassword;
	}

	public boolean getIsAdm() {
		return this.isAdm;
	}

	public void setIsAdm(boolean isAdm) {
		this.isAdm = isAdm;
	}

	@Override
	public String toString() {
		return "User [uid=" + uid + ", uname=" + uname + ", upassword="
				+ upassword + ", isAdm=" + isAdm + "]";
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof User) {  
            User u = (User) obj;  
            return this.getUname().equals(u.getUname()) 
            		&& this.getUpassword().equals(u.getUpassword());
        }  
        return super.equals(obj);  
	}
	
	

}